package com.yeeiee.utils;

import org.apache.flink.table.catalog.ObjectPath;

public interface QuoteIdentifier {
    String quoteIdentifier(String tableName);

    default String quoteIdentifier(String databaseName, String tableName) {
        return quoteIdentifier(databaseName) + "." + quoteIdentifier(tableName);
    }

    default String quoteIdentifier(ObjectPath tablePath) {
        return quoteIdentifier(tablePath.getDatabaseName(), tablePath.getObjectName());
    }
}
